package com.itheima.test;

import com.itheima.dao.UserDao;
import com.itheima.domain.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Test;

import java.util.List;

public class foreach标签测试 {
    @Test
    public void testFindByEmail1()throws Exception {
        SqlSession sqlSession = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("mybatis-conﬁg.xml")).openSession();

        UserDao userDao = sqlSession.getMapper(UserDao.class);

        List<User> users = userDao.findByEmail1("nglszl@qq.com");

        sqlSession.close();
        System.out.println(users);


    }
}